package com.example.demo.jpa.config.exception;

public class CustomException extends RuntimeException{

    private ExceptionResp exceptionResp;

    private String msg;

    public CustomException(ExceptionResp exceptionResp, String msg) {
        super(msg);
        this.exceptionResp = exceptionResp;
        this.msg = msg;
    }

    public CustomException(ExceptionResp exceptionResp) {
        this(exceptionResp, exceptionResp.getMsg());
    }

    public ExceptionResp getExceptionResp() {
        return exceptionResp;
    }

    public String getMsg() {
        return msg;
    }
}
